package com.master.train.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.master.train.business.dao.DailyTrainCarriageDao;
import com.master.train.business.entity.DailyTrainCarriageEntity;
import com.master.train.business.service.DailyTrainCarriageService;
import com.master.train.common.utils.PageUtils;
import com.master.train.common.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("dailyTrainCarriageService")
public class DailyTrainCarriageServiceImpl extends ServiceImpl<DailyTrainCarriageDao, DailyTrainCarriageEntity> implements DailyTrainCarriageService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DailyTrainCarriageEntity> page = this.page(
                new Query<DailyTrainCarriageEntity>().getPage(params),
                new QueryWrapper<DailyTrainCarriageEntity>()
        );

        return new PageUtils(page);
    }

}